/*
 * Copyright (c) 2023, 2024,yzc.cn All rights reserved.
 *
 */
package com.by.controller;

import com.by.common.bean.Result;
import com.by.remote.ContractStatusClient;
import com.by.server.PurContractServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>Project: erp-cloud-api - PurUpdateStatusController</p>
 * <p>Powered by yzc On 2024-01-19 16:42:17</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@RestController
public class PurUpdateStatusController implements ContractStatusClient {

    @Autowired
   PurContractServer purContractServer;

    @Override
    public Result updateStatus(String code, int status) {
        int rs = purContractServer.updateStatus(code, status);
        if (rs > 0){
            return Result.success("更新状态成功");
        }
        return Result.error("更新失败");
    }
}
